Skip to content

fix: fix and reactivate crusading event#256

Closed
OH296 wants to merge 10 commits intoEttyKitty:developmentfrom
OH296:fix_crusading
Closed

fix: fix and reactivate crusading event#256
OH296 wants to merge 10 commits intoEttyKitty:developmentfrom
OH296:fix_crusading

Conversation

@OH296
Copy link

@OH296 OH296 commented Mar 26, 2025

Purpose of changes

make the crusading event naturally spawn in game again
also make some improvements to code base
ensure crusades are always reachable by player by creating get_viable_travel_time function which uses the fastest route algorithm to ensure a location can always be reached by at least 1 fleet with a margin of 10 turns

Describe the solution

  • allow the crusade1 2 and 3 actions to be sent into the set fleet movement function

Testing done

us "event crusade" cheat to spawn crusade and send player fleet on crusade

Related links

None

Custom player notes entry

Use the PR title.

Summary by CodeRabbit

  • New Features

    • Introduced a new psychic power “Assail” and dynamic crusade assignment with travel time estimation.
  • Documentation

    • Revised guidelines for custom chapter icons with updated file paths and naming conventions.
  • Gameplay Improvements

    • Lowered the Librarian role requirements and refined fleet actions and shooting behavior for smoother performance.
  • UI Enhancements

    • Enhanced tooltips, keyboard shortcuts, and menu interactions for a more intuitive user experience.

@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2025

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 096b803 and 0c42d93.

📒 Files selected for processing (35)
  • ChapterMaster.yyp (0 hunks)
  • datafiles/README.md (1 hunks)
  • datafiles/data/psychic_disciplines.json (1 hunks)
  • datafiles/data/psychic_powers.json (1 hunks)
  • datafiles/icons/custom_icons_help.txt (0 hunks)
  • objects/obj_controller/Create_0.gml (1 hunks)
  • objects/obj_controller/Step_0.gml (1 hunks)
  • objects/obj_cuicons/Alarm_0.gml (1 hunks)
  • objects/obj_cuicons/Alarm_1.gml (1 hunks)
  • objects/obj_cuicons/Alarm_2.gml (1 hunks)
  • objects/obj_cuicons/Destroy_0.gml (1 hunks)
  • objects/obj_en_fleet/Alarm_1.gml (1 hunks)
  • objects/obj_p_fleet/Alarm_1.gml (3 hunks)
  • scripts/__init_external/__init_external.gml (1 hunks)
  • scripts/exp_and_exp_growth/exp_and_exp_growth.gml (1 hunks)
  • scripts/scr_ComplexSet/scr_ComplexSet.gml (1 hunks)
  • scripts/scr_clean/scr_clean.gml (9 hunks)
  • scripts/scr_company_struct/scr_company_struct.gml (3 hunks)
  • scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml (1 hunks)
  • scripts/scr_controller_helpers/scr_controller_helpers.gml (1 hunks)
  • scripts/scr_creation_draw_slides/scr_creation_draw_slides.gml (1 hunks)
  • scripts/scr_crusade/scr_crusade.gml (1 hunks)
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml (3 hunks)
  • scripts/scr_draw_unit_image/scr_draw_unit_image.gml (10 hunks)
  • scripts/scr_drop_select_function/scr_drop_select_function.gml (1 hunks)
  • scripts/scr_enemy_ai_d/scr_enemy_ai_d.gml (1 hunks)
  • scripts/scr_equipment_struct/scr_equipment_struct.gml (5 hunks)
  • scripts/scr_fleet_functions/scr_fleet_functions.gml (3 hunks)
  • scripts/scr_player_fleet_functions/scr_player_fleet_functions.gml (1 hunks)
  • scripts/scr_powers/scr_powers.gml (9 hunks)
  • scripts/scr_random_event/scr_random_event.gml (1 hunks)
  • scripts/scr_shoot/scr_shoot.gml (2 hunks)
  • scripts/scr_star_travel_algorithm/scr_star_travel_algorithm.gml (1 hunks)
  • scripts/scr_ui_manage/scr_ui_manage.gml (10 hunks)
  • scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml (2 hunks)

Walkthrough

These changes update various data, object, and script files across the project, nyan. Data files have revised configuration entries and updated instructions for custom icons, while JSON files for psychic disciplines and powers have been modified, nyan. Object scripts now adjust role requirements and add a try‑catch error handling block for stability, nyan. Several script files have been reformatted for consistency and updated to improve gameplay logic—such as dynamic crusade assignment and fleet movement—and to clean up debug outputs, nyan.

Changes

File(s) Change Summary
ChapterMaster.yyp, datafiles/README.md, datafiles/.../psychic_disciplines.json, datafiles/.../psychic_powers.json, datafiles/icons/custom_icons_help.txt Removed duplicate/obsolete file entries; updated custom icon instructions; modified psychic discipline powers (removed "wave_of_force", added "assail") and added new psychic power "Assail", nyan.
objects/obj_controller/Create_0.gml, objects/obj_controller/Step_0.gml, objects/obj_cuicons/Alarm_0.gml, objects/obj_cuicons/Alarm_1.gml, objects/obj_cuicons/Alarm_2.gml, objects/obj_cuicons/Destroy_0.gml, objects/obj_en_fleet/Alarm_1.gml, objects/obj_p_fleet/Alarm_1.gml Adjusted role requirements; introduced try‑catch error handling; reformatted custom icon processing (using string interpolation and corrected conditionals); fixed operator error in fleet action, nyan.
scripts/__init_external/__init_external.gml, scripts/exp_and_exp_growth/..., scripts/scr_ComplexSet/..., scripts/scr_clean/..., scripts/scr_company_struct/..., scripts/scr_complex_colour_kit/..., scripts/scr_controller_helpers/..., scripts/scr_creation_draw_slides/... Added directory checks and defined PATH_custom_icons macro; commented out debug messages; added tooltips and keystroke assignments; restructured menu handling and updated function signatures; enhanced custom chapter icon fallback, nyan.
scripts/scr_crusade/..., scripts/scr_draw_management_unit/..., scripts/scr_draw_unit_image/..., scripts/scr_drop_select_function/..., scripts/scr_enemy_ai_d/..., scripts/scr_equipment_struct/..., scripts/scr_fleet_functions/..., scripts/scr_player_fleet_functions/..., scripts/scr_powers/..., scripts/scr_random_event/..., scripts/scr_shoot/..., scripts/scr_star_travel_algorithm/..., scripts/scr_ui_manage/..., scripts/scr_unit_quick_find_pane/... Updated crusade and fleet movement functions with dynamic ETA and nearest fleet checks; improved unit drawing, selection logic and debug cleanup; reformatted enums and function parameters; added new function get_viable_travel_time; refined UI management for clarity, nyan.

Sequence Diagram(s)

sequenceDiagram
    participant GE as "Game Engine"
    participant S0 as "Step_0.gml"
    participant EH as "handle_exception()"
    GE->>S0: Execute menu, audio, & cheat code logic
    alt Successful Execution
      S0-->>GE: Continue normal processing
    else Exception Occurs
      S0->>EH: Call handle_exception(_exception)
      EH-->>GE: Error handling response returned
    end
Loading
sequenceDiagram
    participant LC as "launch_crusade()"
    participant PF as "get_nearest_player_fleet()"
    participant VT as "get_viable_travel_time()"
    participant GL as "Game Log"
    LC->>PF: Retrieve nearest player fleet using star coords
    alt Fleet Found
       LC->>VT: Compute dynamic travel time (ETA)
       VT-->>LC: Return computed ETA
       LC->>GL: Log event and display popup with ETA
       LC->>LC: Assign crusade with random planet selection
    else No Fleet Found
       LC-->>LC: Return false (no fleet available)
    end
Loading

Suggested labels

PR: Sprites

Suggested reviewers

  • sourcery-ai

Poem

In a world of code and fun, nyan
Each fix purrs like morning sun, nyan
Errors caught with a gentle try, nyan
And fleets now dance as they fly, nyan
Our changes shine bright—oh my, nyan!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added PR: Fix This is a fix for a bug PR: Docs Improvements or additions to documentation PR: JSON Edits to external JSON files Size: Warning! labels Mar 26, 2025
@OH296 OH296 closed this Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Docs Improvements or additions to documentation PR: Fix This is a fix for a bug PR: JSON Edits to external JSON files Size: Warning!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants